Document actions
authorMatthias Clasen <mclasen@redhat.com>
Sat, 11 Apr 2020 03:59:21 +0000 (23:59 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 11 Apr 2020 14:07:31 +0000 (10:07 -0400)
gtk/gtkcoloreditor.c
gtk/gtkcolorswatch.c
gtk/gtklabel.c
gtk/gtklinkbutton.c
gtk/gtknotebook.c
gtk/gtkplacesview.c
gtk/gtktext.c
gtk/gtktextview.c
gtk/gtkwindow.c

index 694557eabe2c825c8679af6cdc6e4c9bcfc29291..66c2c49e4a07ac967b1c10a2b39c0bd02cc6b202 100644 (file)
@@ -561,10 +561,13 @@ gtk_color_editor_class_init (GtkColorEditorClass *class)
   gtk_widget_class_bind_template_callback (widget_class, entry_focus_changed);
   gtk_widget_class_bind_template_callback (widget_class, pick_color);
 
+  /**
+   * GtkColorEditor|color.edit:
+   * @component: the component to edit, "h", "sv" or "a"
+   *
+   * Opens the edit popup for one of the color components.
+   */ 
   gtk_widget_class_install_action (widget_class, "color.edit", "s", popup_edit);
-  gtk_widget_class_install_action (widget_class, "color.edit", "s", popup_edit);
-  gtk_widget_class_install_action (widget_class, "color.edit", "s", popup_edit);
-
 }
 
 static void
index 72d66192cc3c13434fdc9a96c6ea61bd903b51b3..5660b52b4ca862fec415e026e2c2cb237d7b6499 100644 (file)
@@ -497,6 +497,11 @@ gtk_color_swatch_class_init (GtkColorSwatchClass *class)
       g_param_spec_boolean ("can-drop", P_("Can Drop"), P_("Whether the swatch should accept drops"),
                             FALSE, GTK_PARAM_READWRITE));
 
+  /**
+   * GtkColorSwatch|menu.popup:
+   *
+   * Opens the context menu. 
+   */
   gtk_widget_class_install_action (widget_class, "menu.popup", NULL, swatch_popup_menu);
 
   gtk_widget_class_add_binding_action (widget_class,
index 10067567430c13480a688debac0566e598186a83..f930b2de73e533bfd12b424cc18a3bb47c6ece28 100644 (file)
@@ -1023,6 +1023,11 @@ gtk_label_class_init (GtkLabelClass *class)
 
   g_object_class_install_properties (gobject_class, NUM_PROPERTIES, label_props);
 
+  /**
+   * GtkLabel|menu.popup:
+   *
+   * Opens the context menu. 
+   */
   gtk_widget_class_install_action (widget_class, "menu.popup", NULL, gtk_label_popup_menu);
 
   /*
index 96831ec0834a05c1ca2addca3bcbd109887ef1aa..b99ae2a0d451dd8704b365d2d9ada0382bde41e4 100644 (file)
@@ -228,9 +228,19 @@ gtk_link_button_class_init (GtkLinkButtonClass *klass)
   gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_LINK_BUTTON_ACCESSIBLE);
   gtk_widget_class_set_css_name (widget_class, I_("button"));
 
+  /**
+   * GtkLinkButton|clipboard.copy:
+   *
+   * Copies the url to the clipboard.
+   */
   gtk_widget_class_install_action (widget_class, "clipboard.copy", NULL,
                                    gtk_link_button_activate_clipboard_copy);
 
+  /**
+   * GtkLinkButton|menu.popup:
+   *
+   * Opens the context menu. 
+   */
   gtk_widget_class_install_action (widget_class, "menu.popup", NULL, gtk_link_button_popup_menu);
 
   gtk_widget_class_add_binding_action (widget_class,
index 36a651d23cc449d78fc151f474aae65a28ce183a..3edb540074ef45a45c79b2a8a91ef1e84dceaea5 100644 (file)
@@ -1304,6 +1304,11 @@ gtk_notebook_class_init (GtkNotebookClass *class)
                               G_TYPE_FROM_CLASS (gobject_class),
                               _gtk_marshal_OBJECT__OBJECTv);
 
+  /**
+   * GtkNotebook|menu.popup:
+   *
+   * Opens the context menu. 
+   */
   gtk_widget_class_install_action (widget_class, "menu.popup", NULL, gtk_notebook_popup_menu);
 
   gtk_widget_class_add_binding_signal (widget_class,
index 61938f345c6e9495218b8c5e9d99c55be193ba84..415358486fad868ff6900d9c5010b68b33812aa0 100644 (file)
@@ -2330,12 +2330,53 @@ gtk_places_view_class_init (GtkPlacesViewClass *klass)
   gtk_widget_class_bind_template_callback (widget_class, on_listbox_row_activated);
   gtk_widget_class_bind_template_callback (widget_class, on_recent_servers_listbox_row_activated);
 
+  /**
+   * GtkPlacesView|location.open:
+   *
+   * Opens the location in the current window.
+   */
   gtk_widget_class_install_action (widget_class, "location.open", NULL, open_cb);
+
+  /**
+   * GtkPlacesView|location.open-tab:
+   *
+   * Opens the location in a new tab.
+   */
   gtk_widget_class_install_action (widget_class, "location.open-tab", NULL, open_cb);
+
+  /**
+   * GtkPlacesView|location.open-window:
+   *
+   * Opens the location in a new window.
+   */
   gtk_widget_class_install_action (widget_class, "location.open-window", NULL, open_cb);
+
+  /**
+   * GtkPlacesView|location.mount:
+   *
+   * Mount the location.
+   */
   gtk_widget_class_install_action (widget_class, "location.mount", NULL, mount_cb);
+
+  /**
+   * GtkPlacesView|location.connect:
+   *
+   * Connect the location.
+   */
   gtk_widget_class_install_action (widget_class, "location.connect", NULL, mount_cb);
+
+  /**
+   * GtkPlacesView|location.unmount:
+   *
+   * Unmount the location.
+   */
   gtk_widget_class_install_action (widget_class, "location.unmount", NULL, unmount_cb);
+
+  /**
+   * GtkPlacesView|location.disconnect:
+   *
+   * Disconnect the location.
+   */
   gtk_widget_class_install_action (widget_class, "location.disconnect", NULL, unmount_cb);
 
   gtk_widget_class_set_css_name (widget_class, I_("placesview"));
index 7908e31119c3ee4ba4e33c4ef0fddff68e4050f7..1d56e7ea1f46366a6864245c9b02735b2caf30b8 100644 (file)
@@ -1194,9 +1194,82 @@ gtk_text_class_init (GtkTextClass *class)
                   NULL, NULL,
                   NULL,
                   G_TYPE_NONE, 0);
+  
+  /*
+   * Actions
+   */
+
+  /**
+   * GtkText|clipboard.cut:
+   *
+   * Copies the contents to the clipboard and deletes it from the widget.
+   */
+  gtk_widget_class_install_action (widget_class, "clipboard.cut", NULL,
+                                   gtk_text_activate_clipboard_cut);
+
+  /**
+   * GtkText|clipboard.copy:
+   *
+   * Copies the contents to the clipboard.
+   */
+  gtk_widget_class_install_action (widget_class, "clipboard.copy", NULL,
+                                   gtk_text_activate_clipboard_copy);
+
+  /**
+   * GtkText|clipboard.copy:
+   *
+   * Inserts the contents of the clipboard into the widget.
+   */
+  gtk_widget_class_install_action (widget_class, "clipboard.paste", NULL,
+                                   gtk_text_activate_clipboard_paste);
+
+  /**
+   * GtkText|selection.delete:
+   *
+   * Deletes the current selection. 
+   */
+  gtk_widget_class_install_action (widget_class, "selection.delete", NULL,
+                                   gtk_text_activate_selection_delete);
+
+  /**
+   * GtkText|selection.select-all:
+   *
+   * Selects all of the widgets content.
+   */
+  gtk_widget_class_install_action (widget_class, "selection.select-all", NULL,
+                                   gtk_text_activate_selection_select_all);
+
+  /**
+   * GtkText|misc.insert-emoji:
+   *
+   * Opens the Emoji chooser.
+   */
+  gtk_widget_class_install_action (widget_class, "misc.insert-emoji", NULL,
+                                   gtk_text_activate_misc_insert_emoji);
+
+  gtk_widget_class_install_property_action (widget_class,
+                                            "misc.toggle-visibility",
+                                            "visibility");
 
+  /**
+   * GtkText|text.undo:
+   *
+   * Undoes the last change to the contents.
+   */ 
   gtk_widget_class_install_action (widget_class, "text.undo", NULL, gtk_text_real_undo);
+
+  /**
+   * GtkText|text.redo:
+   *
+   * Redoes the last change to the contents.
+   */
   gtk_widget_class_install_action (widget_class, "text.redo", NULL, gtk_text_real_redo);
+
+  /**
+   * GtkText|menu.popup:
+   *
+   * Opens the context menu. 
+   */ 
   gtk_widget_class_install_action (widget_class, "menu.popup", NULL, gtk_text_popup_menu);
 
   /*
@@ -1411,22 +1484,6 @@ gtk_text_class_init (GtkTextClass *class)
 
   gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_TEXT_ACCESSIBLE);
   gtk_widget_class_set_css_name (widget_class, I_("text"));
-
-  gtk_widget_class_install_action (widget_class, "clipboard.cut", NULL,
-                                   gtk_text_activate_clipboard_cut);
-  gtk_widget_class_install_action (widget_class, "clipboard.copy", NULL,
-                                   gtk_text_activate_clipboard_copy);
-  gtk_widget_class_install_action (widget_class, "clipboard.paste", NULL,
-                                   gtk_text_activate_clipboard_paste);
-  gtk_widget_class_install_action (widget_class, "selection.delete", NULL,
-                                   gtk_text_activate_selection_delete);
-  gtk_widget_class_install_action (widget_class, "selection.select-all", NULL,
-                                   gtk_text_activate_selection_select_all);
-  gtk_widget_class_install_action (widget_class, "misc.insert-emoji", NULL,
-                                   gtk_text_activate_misc_insert_emoji);
-  gtk_widget_class_install_property_action (widget_class,
-                                            "misc.toggle-visibility",
-                                            "visibility");
 }
 
 static void
index a7d8c5504cbed1d0209a65cee84d78a3f53f0a85..261e46b68e70341a994b03c606eea326271d65a6 100644 (file)
@@ -1464,8 +1464,77 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
                   NULL,
                   G_TYPE_NONE, 0);
 
+  /*
+   * Actions
+   */
+
+  /**
+   * GtkTextView|clipboard.cut:
+   *
+   * Copies the contents to the clipboard and deletes it from the widget.
+   */
+  gtk_widget_class_install_action (widget_class, "clipboard.cut", NULL,
+                                   gtk_text_view_activate_clipboard_cut);
+
+  /**
+   * GtkTextView|clipboard.copy:
+   *
+   * Copies the contents to the clipboard.
+   */
+  gtk_widget_class_install_action (widget_class, "clipboard.copy", NULL,
+                                   gtk_text_view_activate_clipboard_copy);
+
+  /**
+   * GtkTextView|clipboard.paste:
+   *
+   * Inserts the contents of the clipboard into the widget.
+   */
+  gtk_widget_class_install_action (widget_class, "clipboard.paste", NULL,
+                                   gtk_text_view_activate_clipboard_paste);
+
+  /**
+   * GtkTextView|selection.delete:
+   *
+   * Deletes the current selection. 
+   */
+  gtk_widget_class_install_action (widget_class, "selection.delete", NULL,
+                                   gtk_text_view_activate_selection_delete);
+
+  /**
+   * GtkTextView|selection.select-all:
+   *
+   * Selects all of the widgets content.
+   */
+  gtk_widget_class_install_action (widget_class, "selection.select-all", NULL,
+                                   gtk_text_view_activate_selection_select_all);
+
+  /**
+   * GtkTextView|misc.insert-emoji:
+   *
+   * Opens the Emoji chooser.
+   */
+  gtk_widget_class_install_action (widget_class, "misc.insert-emoji", NULL,
+                                   gtk_text_view_activate_misc_insert_emoji);
+
+  /**
+   * GtkTextView|text.undo:
+   *
+   * Undoes the last change to the contents.
+   */
   gtk_widget_class_install_action (widget_class, "text.undo", NULL, gtk_text_view_real_undo);
+
+  /**
+   * GtkTextView|text.redo:
+   *
+   * Redoes the last change to the contents.
+   */
   gtk_widget_class_install_action (widget_class, "text.redo", NULL, gtk_text_view_real_redo);
+
+  /**
+   * GtkTextView|menu.popup:
+   *
+   * Opens the context menu. 
+   */
   gtk_widget_class_install_action (widget_class, "menu.popup", NULL, gtk_text_view_popup_menu);
 
   /*
@@ -1755,19 +1824,6 @@ gtk_text_view_class_init (GtkTextViewClass *klass)
   quark_text_selection_data = g_quark_from_static_string ("gtk-text-view-text-selection-data");
   quark_gtk_signal = g_quark_from_static_string ("gtk-signal");
   quark_text_view_child = g_quark_from_static_string ("gtk-text-view-child");
-
-  gtk_widget_class_install_action (widget_class, "clipboard.cut", NULL,
-                                   gtk_text_view_activate_clipboard_cut);
-  gtk_widget_class_install_action (widget_class, "clipboard.copy", NULL,
-                                   gtk_text_view_activate_clipboard_copy);
-  gtk_widget_class_install_action (widget_class, "clipboard.paste", NULL,
-                                   gtk_text_view_activate_clipboard_paste);
-  gtk_widget_class_install_action (widget_class, "selection.delete", NULL,
-                                   gtk_text_view_activate_selection_delete);
-  gtk_widget_class_install_action (widget_class, "selection.select-all", NULL,
-                                   gtk_text_view_activate_selection_select_all);
-  gtk_widget_class_install_action (widget_class, "misc.insert-emoji", NULL,
-                                   gtk_text_view_activate_misc_insert_emoji);
 }
 
 static void
index 8ae11e66810328fd259d2f7acb505d9ffb9b1bc4..59cf8d94c37207854c3d389d8a97544aac580778 100644 (file)
@@ -1057,6 +1057,11 @@ gtk_window_class_init (GtkWindowClass *klass)
    * Key bindings
    */
 
+  /**
+   * GtkWindow|default.activate:
+   *
+   * Activate the default widget.
+   */
   gtk_widget_class_install_action (widget_class, "default.activate", NULL,
                                    gtk_window_activate_default_activate);